The present invention relates to data storage devices and in particular although not exclusively to a method for recovering data written onto a data storage medium as a plurality of encoded data fragments.
In data storage devices it is known to store data from host devices, e.g. a computer, onto a data storage medium such as a magnetic tape in order to protect data stored on the computer from accidental erasure and the like. An operation to write user data to a data storage medium is also known herein as performing a xe2x80x9cback-upxe2x80x9d operation. In conventional data back-up systems comprising a data storage device and data storage medium it is known to use encryption techniques to encode user data to enable it to be recovered in the event of errors occurring during a write operation to write user data to a data storage medium or during a read operation to read data written onto a data storage medium.
Data storage media for data back-up may comprise a magnetic tape data storage medium, wherein an elongate tape is drawn past a substantially stationary or rotating read/write magnetic head assembly. Data being encoded onto the data storage medium as a sequence of magnetization reversals in a particulate magnetic coating as is known.
Redundancy encryption methods for encoding redundant information into data can be used to reconstruct complete data sets in the event of portions of the data set being lost or corrupted during, for example, writing to or reading from a data storage medium. However, for any redundancy encryption scheme there is a limit on the total number of bytes of digital data that can be recovered from a data set of specified length.
After a complete data set has been successfully written to a data storage medium, then during a subsequent read operation to restore data from the data storage medium corruption of the data can occur; If the data storage medium is a elongate magnetic tape, then during a read operation there are numerous mechanisms by which data being retrieved from a magnetic tape may become corrupted. Among the mechanisms for corrupting data during a read operation are:
Defects in the data storage medium;
A build up of tape oxide on the read head producing a temporary loss of contact between the data storage medium and the read head resulting in a weak or corrupted signal being read;
Electrical noise or interference inducing spurious signals in the read chain electronics.
Prior art methods for data recovery include, in a data storage device having a plurality of read/write heads mounted on a rotating drum angled such that the plurality of read heads trace out a sequence of elongate magnetic tracks diagonally across a magnetic tape data storage medium, there is provided a facility for re-reading entire physical tracks in the event of data being corrupted during a read operation. Re-reading an entire physical track in order to recover corrupt data may significantly slow down the recovery of data from a data storage mediun in the event of there being a large amount of corrupted or incorrectly read data.
In order to improve the successful and reliable operation of data storage devices, in particular tape data storage devices, it is important to develop improved methods for recovering corrupted or incorrectly read data being read from a data storage medium.
Specific embodiments and methods according to the present invention aim to improve the recovery of corrupted or otherwise incorrectly read data in high data storage density systems, and thereby improve the operation of such devices.
According to a first aspect of the present invention, there is provided a method for recovering data written onto a data storage medium as a plurality of encoded data fragments said method comprising the steps of:
performing a first read operation to read at least one encoded data fragment of said plurality of encoded data fragments from said data storage medium;
storing a first status data indicating whether said at least one data fragment has been correctly read;
if said at least one data fragment is correctly read, writing said at least one read data fragment to a buffer memory;
attempting to decode said at least one encoded data fragment in said buffer memory;
if said attempted decoding is unsuccessful, performing a second read operation for re-reading said at least one encoded data fragment from said data storage medium; and
attempting to decode said re-read encoded data fragment.
Suitably, in said step of writing said at least one data fragment to buffer memory, only said data fragments for which a header data is successfully recovered are written into said buffer memory. Data fragments which are incorrectly read in said first read operation are suitably not read to said buffer memory. Suitably, the status data indicates that a C1 codeword pair has been read and identifies a number of corrupted bytes of data corrected by a C1 decoding algorithm.
Said step of re-reading said at least one incorrectly read encoded data fragment may comprise repositioning a read head at one end of a data set containing at least one incorrectly read encoded data fragment to be re-read and re-reading said data set by traversing said read head between first and second ends of said data set.
Preferably, redundancy coding data is used in said at least one data fragment to enable confirmation that a header field data has been correctly read during a said read operation.
Preferably the method further comprises the steps of generating a second status data indicating whether said at least one data fragment is correctly read during said second read operation, comparing said second status data with said first status data to determine whether the re-read said at least one data fragment has fewer error bytes than corresponding respective said data fragments stored in said buffer memory and if said re-read at least one data fragment has fewer error bytes than said stored data fragment, storing said re-read data fragment in said buffer memory.
Said step of storing said re-read data fragment preferably comprises overwriting an initial stored data fragment from a first read operation with a re-read data fragment from a second read operation.
If a data fragment is read during a said second read operation which has a header identifier data which is not the same as a header identifier data of a said data fragment already written to said buffer memory in said first read operation, said data fragment read in said second read operation may be written to a location in said buffer memory determined by said header identifier data.
Preferably said step of attempting to decode said at least one encoded data fragment in said buffer memory comprises applying a redundancy decoding algorithm to said at least one encoded data fragment in said buffer memory.
Preferably said plurality of encoded data fragments are stored in said buffer memory as a plurality of sub-data sets, said plurality of sub data sets comprising a data set. An encoded data fragment comprises a codeword pair.
According to a second aspect of the present invention there is provided a data storage device configurable to read at least one encoded data fragment from a data storage medium, characterized by comprising:
a means for reading said encoded data fragments from said data storage medium;
a means for applying at least one decoding algorithm to said encoded data fragments;
a first memory means configurable to store status data concerning decoding quality metrics of said encoded data fragments; and
a second memory area configurable to store decoded said data fragments.
Preferably a said reading means comprises:
a transducer configurable to convert data written onto said data storage medium into electronic signals; and
a means for recovering data from said read data fragments indicating a logical position of said at least one read fragment within said plurality of fragments.
Preferably said means for applying at first redundancy decoding algorithm is configurable to apply first and second Reed-Solomon redundancy decoding algorithms.
According to a third aspect of the present invention there is provided a method for recovering a data set written to a data storage medium as a first plurality of encoded data fragments said method comprising the steps of:
performing a read operation of said data set to read at least one of said plurality of encoded data fragments comprising said data set;
storing said read at least one data fragment in an area of a buffer memory reserved for storing data fragments of said data set;
storing in a memory device a quality metric data of said read operation of said at least one data fragment;
decoding said data set comprising said plurality of fragments stored within said buffer memory; and
if said step of decoding said data set within said buffer memory fails, performing a re-read operation to reread incorrectly read data fragments of said data set from said data storage medium.
Preferably said at least one encoded data fragment is a redundancy encoded codeword pair. A said data set preferably comprises a plurality of error correction code redundancy coded sub data sets.
Preferably said step of decoding said data set within said buffer memory comprises:
applying an error correction code redundancy decoding algorithm to each sub data set of a plurality of sub data sets comprising a said a data set; and
storing within a memory device, location data indicating which sub data sets of said plurality of sub data sets have been successfully decoded.
In the best mode, said error correction code redundancy decoding algorithm is a Reed-Solomon redundancy decoding algorithm. Preferably said step of performing a re-read operation comprises re-reading at least one incorrectly read data fragment, and overwriting said at least one re-read data fragment over corresponding respective earlier versions of at least one said data fragment stored in said buffer memory.
Preferably the method further comprising the step of: storing a location data describing memory locations of a plurality of correctly decoded sub data sets comprising said data set, wherein said correctly decoded sub data sets are preserved from overwrite in said buffer memory.
Preferably the method further comprises repeating said re-read operation on said data set a predetermined number of times, such that correctly read versions of data fragments are overwritten over stored data fragments having errors, until a C2 redundancy decoding algorithm can function for decoding said complete data set.
The invention includes a method of recovering data written onto a data storage medium as a plurality of encoded data fragments, said method comprising the steps of:
reading from said data storage medium a data set comprising a plurality of codeword pairs;
checking a header parity data of each said codeword pair;
for individual said codeword pairs, decoding C1 redundancy encoding data from said codeword pair, and using said C1 redundancy data to correct one or a plurality of incorrectly read said codeword pairs;
storing a first status data indicating a number of corrupted bytes of data corrected by said C1 redundancy coding;
applying a second redundancy decoding algorithm for decoding C2 redundancy data of a plurality of sub-data sets within said data set;
using said C2 redundancy encoded data to reconstruct missing or corrupted bytes of data in said data set; and
if said C2 correction fails to fully correct said data set, then re-reading from said data storage medium individual codeword pairs from said data set.
Said step of re-reading individual codeword pairs may comprise reading said status data indicating whether a codeword pair was recovered and indicating a number of bytes in error in said codeword pair; and
if said re-read codeword pair has fewer bytes in error than said same codeword pair originally stored within said memory resulting from said earlier read operation, then overwriting said earlier codeword pair with said re-read codeword pair.
Said step of re-reading said individual codeword pairs may be repeated. Data indicating whether or not a codeword pair has been successfully read from tape and C1 decoded may be stored as a second status data.